Skip to content

Take the release version as a workflow input and run the checks on the bump PR - #872

Merged
oryan-block merged 3 commits into
masterfrom
build/release-automation
Oct 18, 2026
Merged

oryan-block merged 3 commits into
masterfrom
build/release-automation

Conversation

@oryan-block

Copy link
Copy Markdown
Collaborator

Checklist

  • Pull requests follows the contribution guide
  • New or modified functionality is covered by tests

Description

Each release still needs two manual steps around the workflow. Before it runs, the pom and README version bump gets pushed straight to master, so the generated release notes leave it out. After it runs, the "Version Release" PR is opened with GITHUB_TOKEN, so the required checks never run on it and it needs gh pr merge --admin.

The release workflow now takes the version to release as an input (e.g. 14.3.0). github-build.sh sets it in the pom and in the two README snippets (Gradle and Maven) instead of stripping -SNAPSHOT, and stops before deploying if it isn't X.Y.Z. The pom on master still has to end with -SNAPSHOT. The README change gets to master through the Version Release PR like the pom does. The previous release tag is looked up first now, so if gh fails the run stops before anything is published.

After opening the PR, the workflow runs gh workflow run pull-request.yml --ref version-release. GitHub doesn't start workflows for events made with GITHUB_TOKEN, except workflow_dispatch and repository_dispatch, so this runs the checks on the PR's head commit. The PR still needs an approval, which any of us can give since the bot opened it. create-pull-request recommends a GitHub App token for this, but that needs an org app and two secrets. This needs none.

I ran github-build.sh in an Ubuntu container with mvn and gh stubbed and pushes going to a local repo. With 14.3.0 the pom and both README lines became 14.3.0, v14.3.0 was pushed, the draft release started from v14.2.0 and the next version was 14.3.1-SNAPSHOT. With 14.3 it stopped before the deploy. actionlint passes.

Not verified yet: that the dispatched runs count as the required build (N) checks on the PR. workflow_dispatch only works once the workflow is on master, so after this merges I'll dispatch it on #848's branch to check, before releasing 14.3.0. The "Releasing a version" wiki page gets updated after the merge too.

🤖 Generated with Claude Code

@sonarqubecloud

Copy link
Copy Markdown

@oryan-block
oryan-block merged commit 5c5897f into master Oct 18, 2026
7 checks passed
@oryan-block
oryan-block deleted the build/release-automation branch October 18, 2026 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant